//
//  Custom+ImageView.swift
//  weibo
//
//  Created by lucy on 2016/10/23.
//  Copyright © 2016年 com.huashengHuaSheng. All rights reserved.
//

import UIKit
import SDWebImage


extension UIImageView{

    convenience init(imageViewName:String){
        self.init(image:UIImage(named:imageViewName))

    }
    
    func xd_setImage(imageWithURl:String?,placeHolderImageName:String?){
        let url = URL(string: imageWithURl ?? "")
        guard let u = url else{
        
            return
        
        }
        
        self.sd_setImage(with: u, placeholderImage: UIImage(named: placeHolderImageName ?? ""))
    }
}














